package com.StarStudio.Service;

import com.ruoyi.common.core.Entity.Orders;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Service
@FeignClient(value = "Orders")
public interface OrdersService {


    @PostMapping("/orderInsert")
    void OrderInsert(@RequestBody Orders orders);

    @RequestMapping("/NewOrderNumberToday")
    int New_order_number_today(@RequestParam(value = "today") String today);

    @RequestMapping("/AllRecordForAdmin")
    long findAllRecordForAdmin();

    @RequestMapping("/ByStoreIdAndTime/{store_id}")
    List<Orders> findOrdersByStoreIdAndTime(@PathVariable(value = "store_id") Long store_id, @RequestParam(value = "today") String today);

    @RequestMapping("/OrdersByStoreId/{store_id}")
    List<Orders> findOrdersByStoreId(@PathVariable(value = "store_id") Long store_id);

    @RequestMapping("/PurchaseUserToday/{store_id}")
    List<Long> findPurchaseUserToday(@PathVariable(value = "store_id") Long store_id,@RequestParam(value = "today") String today);

    @RequestMapping("/PurchaseUserTotal/{store_id}")
    List<Long> findPurchaseUserTotal(@PathVariable(value = "store_id") Long store_id);
}
